import 'package:massagist/generated/json/base/json_convert_content.dart';
import 'package:massagist/models/setting_model_entity.dart';

SettingModelEntity $SettingModelEntityFromJson(Map<String, dynamic> json) {
	final SettingModelEntity settingModelEntity = SettingModelEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		settingModelEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		settingModelEntity.msg = msg;
	}
	final SettingModelData? data = jsonConvert.convert<SettingModelData>(json['data']);
	if (data != null) {
		settingModelEntity.data = data;
	}
	return settingModelEntity;
}

Map<String, dynamic> $SettingModelEntityToJson(SettingModelEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] = entity.data.toJson();
	return data;
}

SettingModelData $SettingModelDataFromJson(Map<String, dynamic> json) {
	final SettingModelData settingModelData = SettingModelData();
	final String? mtime = jsonConvert.convert<String>(json['mtime']);
	if (mtime != null) {
		settingModelData.mtime = mtime;
	}
	final String? version = jsonConvert.convert<String>(json['version']);
	if (version != null) {
		settingModelData.version = version;
	}
	final String? full = jsonConvert.convert<String>(json['full']);
	if (full != null) {
		settingModelData.full = full;
	}
	final String? tab = jsonConvert.convert<String>(json['tab']);
	if (tab != null) {
		settingModelData.tab = tab;
	}
	final String? rank = jsonConvert.convert<String>(json['rank']);
	if (rank != null) {
		settingModelData.rank = rank;
	}
	final SettingModelDataBox? box = jsonConvert.convert<SettingModelDataBox>(json['box']);
	if (box != null) {
		settingModelData.box = box;
	}
	final String? kefu = jsonConvert.convert<String>(json['kefu']);
	if (kefu != null) {
		settingModelData.kefu = kefu;
	}
	return settingModelData;
}

Map<String, dynamic> $SettingModelDataToJson(SettingModelData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['mtime'] = entity.mtime;
	data['version'] = entity.version;
	data['full'] = entity.full;
	data['tab'] = entity.tab;
	data['rank'] = entity.rank;
	data['box'] = entity.box.toJson();
	data['kefu'] = entity.kefu;
	return data;
}

SettingModelDataBox $SettingModelDataBoxFromJson(Map<String, dynamic> json) {
	final SettingModelDataBox settingModelDataBox = SettingModelDataBox();
	final String? url = jsonConvert.convert<String>(json['url']);
	if (url != null) {
		settingModelDataBox.url = url;
	}
	final String? width = jsonConvert.convert<String>(json['width']);
	if (width != null) {
		settingModelDataBox.width = width;
	}
	final String? height = jsonConvert.convert<String>(json['height']);
	if (height != null) {
		settingModelDataBox.height = height;
	}
	return settingModelDataBox;
}

Map<String, dynamic> $SettingModelDataBoxToJson(SettingModelDataBox entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['url'] = entity.url;
	data['width'] = entity.width;
	data['height'] = entity.height;
	return data;
}